package com.zz.parkingsystem.entity;

import java.io.Serializable;
import lombok.Data;

/**
 * 子菜单表
 * @TableName t_submenu
 */
@Data
public class Submenu implements Serializable {
    /**
     * 子菜单表编号
     */
    private Integer smenuId;

    /**
     * 子菜单名称
     */
    private String smenuName;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Submenu other = (Submenu) that;
        return (this.getSmenuId() == null ? other.getSmenuId() == null : this.getSmenuId().equals(other.getSmenuId()))
            && (this.getSmenuName() == null ? other.getSmenuName() == null : this.getSmenuName().equals(other.getSmenuName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSmenuId() == null) ? 0 : getSmenuId().hashCode());
        result = prime * result + ((getSmenuName() == null) ? 0 : getSmenuName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", smenuId=").append(smenuId);
        sb.append(", smenuName=").append(smenuName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}